{include file="public/header" /}


<div class="page">
    <div class="fixed-empty"></div>
    <form  method="post" name="form1" action="{:url('Serviceapplymoney/status')}" >
        <table class="ds-default-table">
            <tbody>

            <tr class="noborder">
                <td class="required">用户名:
                    <input style="margin-left: 143px;" value="{$list.name}" readonly class="txt" type="text">
                </td>
                <td class="vatop tips"></td>
            </tr>
            <tr class="noborder">
                <td class="required">申请提现金额:
                    <input style="margin-left: 104px;" value="{$list.money}" readonly class="txt" type="text">
                </td>
                <td class="vatop tips"></td>
            </tr>
            <tr class="noborder">
                <td class="required">实际到账
                    <input style="margin-left: 132px" value="{$list.total_money}" readonly class="txt" type="text">
                </td>
                <td class="vatop tips"></td>
            </tr>
            <tr class="noborder">
                <td class="required">银行:
                    <input style="margin-left: 155px;" value="{$list.bank_name}" readonly class="txt" type="text">
                </td>
                <td class="vatop tips"></td>
            </tr>

            <tr class="noborder">
                <td class="required">卡号:
                    <input style="margin-left: 155px; width: 200px" value="{$list.card}" readonly class="txt"
                           type="text">
                </td>
                <td class="vatop tips"></td>
            </tr>

            <tr>
                <td style="width: 500px;" class="required">类型:
                    <select style="margin-left: 154px;" name="status" id="status">
                        <option value="1">同意</option>
                        <option value="2">拒绝</option>
                    </select>
                </td>
            </tr>

            <tr dstype="content" style="display: none;">
                <td style="width: 500px;" >拒绝理由:
                    <textarea style="margin-left: 128px" name="no_content" id="no_content" cols="30"
                              rows="10"></textarea>
                </td>
            </tr>

            </tbody>
            <tfoot>
            <tr class="tfoot">
                <td colspan="15"><input style="line-height: 2px;" class="btn" type="submit"
                                        value="{$Think.lang.ds_submit}"/>
                    <input  value="{$list.id}" name="id"  type="hidden"></td>
            </tr>
            </tfoot>
        </table>
    </form>
</div>
<script>

    $(document).ready(function () {

        $('select[name="status"]').change(function () {
            if ($(this).val() == 1) {
                $('tr[dstype="content"]').hide();
            } else {
                $('tr[dstype="content"]').show();
            }
        });
        $("form").submit(function (e) {

            var status = $('select[name="status"]').val();
            var no_content = $('#no_content').val();

            if (status == 2) {
                if (no_content == '') {
                    layer.msg('请填写拒绝理由');
                    return false;
                }
            }



        });
    });


</script>
